﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_er.aspx.cs" Inherits="WebLosgic.login" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>

<meta name="description" content="这是一个 index 页面">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="assets/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="assets/css/amazeui.min.css" />
  <link rel="stylesheet" href="assets/css/admin.css">
  <link rel="stylesheet" href="assets/css/app.css">
    <style type="text/css">
        .HH{
        padding-top:5px;
        }
    </style>
</head>

<body data-type="login">
     <form id="form1" runat="server">
  <div class="am-g myapp-login">
	<div class="myapp-login-logo-block  tpl-login-max">
		<div class="myapp-login-logo-text">
			<div class="myapp-login-logo-text">
				<span> 登录</span> <i class="am-icon-skyatlas"></i>
				
			</div>
		</div>
      
		<div class="login-font">
			
		</div>
		<div class="am-u-sm-10 login-am-center">
			
				<fieldset>
					<div class="am-form-group">
                        <asp:TextBox ID="count"  runat="server"  ForeColor="#666666" Width="597px" placeholder="请输入账号"></asp:TextBox>
					</div>
					<div class="HH">
                        <asp:TextBox ID="pwd"   runat="server" ForeColor="#666666" TextMode="Password" Width="597px" placeholder="请输入密码"></asp:TextBox>
					</div>
					<p>
                        <asp:Button ID="Button1" runat="server" CssClass="am-btn am-btn-default" Text="登录" /></p>
				</fieldset>
            <asp:Label ID="LabID" runat="server" Text=""></asp:Label>
            <asp:Label ID="LabeName" runat="server" Text=""></asp:Label>
		</div>
        
	</div>
</div>
         

  <script src="assets/js/jquery.min.js"></script>
  <script src="assets/js/amazeui.min.js"></script>
  <script src="assets/js/app.js"></script>
         <script type="text/javascript">
             $(function () {
                 $("#Button1").click(function () {
                     var Accounts = $("#count").val();
                     var Passwords = $("#pwd").val();
                     
                     $.ajax({
                         type: "POST",
                         url: "../HeanderAJAX/LoginHandler.ashx",
                         data: { "Act": Accounts, "pwd": Passwords },
                         async: false,
                         success: function (data) {
                             //alert(data);
                             if (data == "登录成功") {
                                 window.location.href = "../index.aspx";
                             } else {
                                 alert(data)
                             }

                             
                         },
                         error: function (req) {
                             alert(req);
                         }
                     });
                     return false;//这个位置加一个返回失败
                 })


             })

         </script>
         </form>
</body>

</html>
